import api from '@/http/api.js'
export default {
    namespaced: true,
    state: {
      rows:[],
      total:0,
      pages:0
    },
    mutations:{
      SET_DATA(state,payload){
        Object.assign(state,payload)
      },
  
    },
    actions: {
        async getDataAsync(context,payload) {
          const res = await api.users.getUsers(payload)
          console.log(res); 
          if(res.code){
            context.commit('SET_DATA',res.data)
          }
        },
   
    }

}